import request from '@/utils/request'
export default{
    saveMedicalrecord(medicalrecord){
        return request({
            url: `/vue-admin-template/medicalrecord/saveMedicalrecord`,
            method: 'post',
            data:medicalrecord
          })
    },
    getInspectitemList(inspectids,inspectname){
        return request({
            url: `/vue-admin-template/inspectitem/getInspectitemList?inspectids=${inspectids}&inspectname=${inspectname}`,
            method: 'get',
          })
    },
    getCheckitemList(cids,itemname){
        return request({
            url: `/vue-admin-template/checkitem/getCheckitemList?cids=${cids}&itemname=${itemname}`,
            method: 'get',
          })
    },
    saveInspectiteMrecord(inspectitem,pid){
        return request({
            url: `/vue-admin-template/inspectitemrecord/saveInspectiteMrecord?pid=${pid}`,
            method: 'post',
            data: inspectitem
          }) 
      },
      saveCheckiteMrecord(checkitem,pid){
        return request({
            url: `/vue-admin-template/checkitemrecord/saveCheckiteMrecord?pid=${pid}`,
            method: 'post',
            data: checkitem
          }) 
      },
      saveGlobal(medicalrecord,inspectitem,checkitem,pid){
          let global={medicalrecord,inspectitem,checkitem};
        return request({
            url: `/vue-admin-template/medicalrecord/saveGlobal?pid=${pid}`,
            method: 'post',
            data: global
          }) 
      },
      updateIMrecordById(imids){
      return request({
          url: `/vue-admin-template/inspectitemrecord/updateIMrecordById?imids=${imids}`,
          method: 'get',
        }) 
    },
    updateIMrecordById2(imids){
        return request({
            url: `/vue-admin-template/checkitemrecord/updateIMrecordById2?imids=${imids}`,
            method: 'get',
          }) 
      }
}